package cn.edu.lingnan.tag;

import jakarta.servlet.jsp.JspTagException;
import jakarta.servlet.jsp.tagext.TagSupport;

public class TagExample5 extends TagSupport {
	public String value;
	public void setValue(String value){
		this.value=value;
    }
	public String getValue(){
		return value;
	}

	public int doStartTag() throws JspTagException {
		TagExample4 parent=(TagExample4)this.getParent();
        try{
        	if(parent.getValue().equals(getValue()))
        		return EVAL_BODY_INCLUDE;
        	else
        		return SKIP_BODY;
        	}catch(NullPointerException e){
        		return SKIP_BODY;
            }
        }
       
}
